﻿namespace Repositories.DM;

/// <summary>
/// 角色
/// </summary>
[SugarTable("s_role")]
public class Role : Column_Base
{
    /// <summary>
    /// 名称
    /// </summary>
    [SugarColumn(ColumnName = "name")]
    public string Name { get; set; }

    /// <summary>
    /// 模块id数组
    /// </summary>
    [SugarColumn(ColumnName = "features", IsJson = true)]
    public List<int> Features { get; set; }

    /// <summary>
    /// 场地id数组
    /// </summary>
    [SugarColumn(ColumnName = "sites", IsJson = true)]
    public List<int> Sites { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [SugarColumn(ColumnName = "createtime")]
    public DateTime CreateTime { get; set; } = DateTime.Now;

    /// <summary>
    /// 是否启用（1：启用，2：禁用）
    /// </summary>
    [SugarColumn(ColumnName = "enable")]
    public int Enable { get; set; } = 1;
}
